﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Enemy : MonoBehaviour {

    protected Animator anim;

	// Use this for initialization
	protected virtual void Start () {
        anim=GetComponent<Animator>();
	}

    public void OnDie()
    {
        anim.SetTrigger("die");
        Destroy(gameObject, 0.5f);
    }
}
